<?php
class VisitAction extends  Action {
	public function index(){
            $v=M('Visit');
            $vlist=$v->order('ip desc')->select(); 
            import("@.ORG.Page");       //导入分页类
            $count = $v->count();    //计算总数
            $p = new Page($count, 5);
            $list = $v->limit($p->firstRow . ',' . $p->listRows)->order('create_time desc')->select();
            $page = $p->show();
            $this->assign("page", $page); 
            $this->assign('vlist',$vlist);
            $this->display('Index:index');
	}
}